<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
    <meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,viewport-fit=cover">
<link rel="stylesheet" href="__PUBLIC__/assets_reg/css/zpui.css"/>
<link rel="stylesheet" href="__PUBLIC__/assets_reg/css/all.css"/>
<script src="__PUBLIC__/assets_reg/js/page.js"></script>

    <title> 注册 </title>
    <style>
        .border-after_none:after {
            border: none!important;
        }
        .weui-label {
            width: 1rem!important;
        }
        .weui-agree__checkbox:checked:before {
            font-weight: bold;
        }
        /*-----------------------规则弹出框--------------------*/

        #guize .weui-popup__modal {
            background-color: rgba(0, 0, 0, 0.3);
        }

        #guize .weui-popup__modal .guize-box {
            position: absolute;
            width: 4.266667rem;
            height: 4.5rem;
            top: 50%;
            left: 50%;
            margin-left: -2.133333rem;
            margin-top: -2.6rem;
            margin-bottom: .5rem;
            background-color: #fff;
            border-radius: 10px;
            padding-top: 0.333333rem;
            box-sizing: border-box;
            position: relative;
        }

        #guize .weui-popup__modal .guize-box .guize-box_hd {
            text-align: center;
            font-size: 0.24rem;
            color: #282c37;
            font-weight: 500;
            margin-bottom: 0.266667rem;
        }

        #guize .weui-popup__modal .guize-box .guize-box_bd {
            padding-left: 0.333333rem;
            padding-right: 0.333333rem;
        }

        #guize .weui-popup__modal .guize-box .guize-box_bd li {
            display: -webkit-box;
            display: -webkit-flex;
            display: flex;
            -webkit-box-pack: start;
            -webkit-justify-content: flex-start;
            justify-content: flex-start;
            -webkit-box-align: baseline;
            -webkit-align-items: baseline;
            align-items: baseline;
            margin-bottom: 0.2rem;
        }

        #guize .weui-popup__modal .guize-box .guize-box_bd li .num {
            width: 0.2rem;
            height: 0.2rem;
            background-color: #ea9c3b;
            border-radius: 50%;
            color: #ffffff;
            text-align: center;
            line-height: 0.133333rem;
            margin-right: 0.066667rem;
            line-height: 0.2rem;
            font-size: 0.173333rem;
        }

        #guize .weui-popup__modal .guize-box .guize-box_bd li .text {
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            flex: 1;
            line-height: 0.293333rem;
            letter-spacing: 0;
            color: #282c37;
        }

        #guize .weui-popup__modal .guize-box .guize-box_ft {
            position: absolute;
            bottom: -0.766667rem;
            text-align: center;
            width: 100%;
        }

        #guize .weui-popup__modal .guize-box .guize-box_ft img {
            width: 0.466667rem;
        }

    </style>
</head>
<body>
<div class="page">
    <div class="page-hd">
        <div class="header">
    <div class="header-left">
        <a href="javascript:history.go(-1)" class="left-arrow"></a>
    </div>
    <div class="header-title">注册</div>
    <div class="header-right">
        <div class="right_menu">
            
        </div>
    </div>
</div>
    </div>
    <div class="page-bd" >
        <!-- 页面内容-->
        <div class="weui-cells bg-fff" >
            <div class="weui-cell">
                <div class="weui-cell__hd">
                    <label class="weui-label">推荐码</label>
                </div>
                <div class="weui-cell__bd">
                    <input class="weui-input phone_input" name="invitecode" value="{$invitecode}" placeholder="请输入推荐码" type="text">
                </div>
            </div>
            <div class="weui-cell">
                <div class="weui-cell__hd">
                    <label class="weui-label">手机号</label>
                </div>
                <div class="weui-cell__bd">
                    <input class="weui-input phone_input" name="account"  onInput ="returnNum(this)" maxlength="11" type="tel" placeholder="请输入手机号" type="text">
                </div>
            </div>
            <div class="weui-cell">
                <div class="weui-cell__hd">
                    <label class="weui-label">输入姓名</label>
                </div>
                <div class="weui-cell__bd">
                    <input class="weui-input phone_input" placeholder="输入姓名"  name="nickname"  type="text">
                </div>
            </div>
            <div class="weui-cell">
                <div class="weui-cell__hd">
                    <label class="weui-label">登录密码</label>
                </div>
                <div class="weui-cell__bd">
                    <input class="weui-input phone_input" placeholder="设置密码 （6-16个字符,需含数字、字母）" type="password" name="password">
                </div>
            </div>
            <div class="weui-cell">
                <div class="weui-cell__hd">
                    <label class="weui-label">确认密码</label>
                </div>
                <div class="weui-cell__bd">
                    <input class="weui-input phone_input" placeholder="再次输入密码" name="relogin_pwd"  type="password">
                </div>
            </div>
            <div class="weui-cell">
                <div class="weui-cell__hd">
                    <label class="weui-label">二级密码</label>
                </div>
                <div class="weui-cell__bd">
                    <input class="weui-input phone_input"placeholder="设置二级密码 （6-16个字符,需含数字、字母）" type="password" name="paypassword">
                </div>
            </div>
            <div class="weui-cell">
                <div class="weui-cell__hd">
                    <label class="weui-label">确认密码</label>
                </div>
                <div class="weui-cell__bd">
                    <input class="weui-input phone_input" placeholder="再次输入二级密码" name="relogin_paypasspwd"  type="password">
                </div>
            </div>
        </div>
        <div class="weui-agree pt40 pb0">
            <input id="weuiAgree" type="checkbox" name="agree" class="weui-agree__checkbox">
            <span class="weui-agree__text">
                我已详细阅读并同意
                <a href="javascript:void(0);" class="color1 open-popup" data-target="#guize">服务条款</a>
            </span>
        </div>
        <div class="weui-btn-area">
            <input class="weui-input" maxlength="6" id="yzm_input" onInput ="returnNum(this)" name="code" value="1" placeholder="输入验证码" type="hidden">
            <a href="javascript:void(0)" onclick="reg()" style="background-image: linear-gradient(250deg, #e62e2e 0%, #e62e2e 100%), linear-gradient(#e62e2e, #e62e2e) !important;
    box-shadow: 0.033333rem 0.058rem 0.133333rem 0 rgba(157, 157, 157, 0.3);
}"  class="weui-btn weui-btn_primary bg-danger">立即注册</a>
        </div>
        <div class="fixed_style1">
            <!-- <a href="首页.html" class="weui-btn weui-btn_plain-primary weui-btn_class1">首页</a> -->
        </div>

    </div>
</div>
<div id="guize" class="weui-popup__container alert_box">
    <div class="weui-popup__overlay"></div>
    <div class="weui-popup__modal guize-box">
        <div class="guize-box weui-popup__modal_box" style="background-image: url('__PUBLIC__/assets_reg/images/dc_alert.png')">
            <div class="guize-box_hd">
                注册协议
            </div>
            <div class="guize-box_bd">
                <ul style="height: 3rem;overflow: auto;">
                    <li>
                        <span class="num" style="background-color: #9752de;">1</span>
                        <p class="text">
                            尊敬的ACC渔民请认真阅读以下规则
                        </p>
                    </li>
                    <li>
                        <span class="num" style="background-color: #9752de;">2</span>
                        <p class="text">
                            年龄范围18至70周岁，不用上传手持照片，注册账号必须为本人银行卡绑定手机号码，平台将在2天内审核完毕。
                        </p>
                    </li>
                    <li>
                        <span class="num" style="background-color: #9752de;">3</span>
                        <p class="text">
                            平台为保证每位渔民资金安全，渔民真实姓名与支付宝不一致将永久封号处理。
                        </p>
                    </li>
                    <li>
                        <span class="num" style="background-color: #9752de;">4</span>
                        <p class="text">
                            如果支付宝账号设置隐私导致买方查找不到无法完成打款的，一经查实，卖方将被系统临时冻结账号。
                        </p>
                    </li>
                    <li>
                        <span class="num" style="background-color: #9752de;">5</span>
                        <p class="text">
                            交易规则请严格遵照俱乐部制度执行，买方2小时内完成打款并上传打款凭证；卖方2小时内确认收款或对买方违规操作进行举报，举报后平台会进行公平处理；任何一方违规将被系统临时冻结账号。
                        </p>
                    </li>
                    <li>
                        <span class="num" style="background-color: #9752de;">6</span>
                        <p class="text">
                            ACC渔民俱乐部完全去中心化，渔民点对点交易，所有资金不经过俱乐部，无充值提现，零门槛，零出资，零风险，安全免费，可自由卖币退出。投资自由，风险自控，用户用闲散资金参与。
                        </p>
                    </li>
                    <li>
                        <span class="num" style="background-color: #9752de;">7</span>
                        <p class="text">
                            平台每日将在交易时间结束后开启自动检测系统，恶意刷号将会连带封杀。
                        </p>
                    </li>
                    
                </ul>
            </div>
            <div class="guize-box_ft">
                <img src="__PUBLIC__/assets_reg/images/icon_del1.png" alt="" class="close-popup">
            </div>
        </div>

    </div>
</div>

<script src="__PUBLIC__/assets_reg/js/lib/jquery-2.1.4.js"></script>
<script src="__PUBLIC__/assets_reg/js/jquery-weui.min.js"></script>

<script>
$.toast.prototype.defaults.duration = 1500;
    function returnNum(_this) {
        _this.value = _this.value.replace(/[^0-9]/g, '');
    }

    var load_app_link="{$poster.poster_link}";
    reg = function () {
        if ($("input[name='password']").val() !== $("input[name='relogin_pwd']").val() ) {
            $.toast("两次密码不一致", "cancel");
            return false;
        }
        if ($("input[name='paypassword']").val() !== $("input[name='relogin_paypasspwd']").val() ) {
            $.toast("两次二级密码不一致", "cancel");
            return false;
        }
        var agree = $("input[name='agree']").is(':checked');
        if (agree == false) {
            $.toast("需同意注册条款方可注册", "cancel");
            return false;
        }
        $.ajax({
            method: 'POST',
            dataType: 'JSON',
            data: {
                "agree" : agree,
                "nickname" : $("input[name='nickname']").val(),
                "invitecode" : $("input[name='invitecode']").val(),
                "account" : $("input[name='account']").val(),
                "code" : $("input[name='code']").val(),
                "password" : $("input[name='password']").val(),
                "paypassword" : $("input[name='paypassword']").val()
            },
            headers: {'Content-Type': 'application/x-www-form-urlencoded'},
            url: "{:U('Login/validaform')}",
            success: function (data) {
                if(data.code==-1){
                    $.toast(data.msg, "cancel");

                }else if(data.code==0){
                    setTimeout(function () {
                        gotoreg();
                    },100)
                }
            },error: function (result) {
                $.toast('请求错误', "cancel");

            }
        });
    }
    gotoreg = function () {
        $.ajax({
            method: 'POST',
            dataType: 'JSON',
            data: {
                "nickname" : $("input[name='nickname']").val(),
                "invitecode" : $("input[name='invitecode']").val(),
                "account" : $("input[name='account']").val(),
                "code" : $("input[name='code']").val(),
                "password" : $("input[name='password']").val(),
                "paypassword" : $("input[name='paypassword']").val(),
            },
            headers: {'Content-Type': 'application/x-www-form-urlencoded'},
            url: "{:U('Login/register')}",
            success: function (data) {
                if(data.code==-1){
                    $.toast(data.msg, "cancel");
                }
                else if(data.code==0){
                    $.toast("注册成功");
                    setTimeout(function () {
                        // window.location.href="/index.php/Vpay/Login/login"
                        var act = {$act};
                        if (act == 1) {
                            if(load_app_link){
                                window.location.href = load_app_link;
                            }else{
                                window.location.href = "{:U('Login/app_download')}"
                            }

                        }else{
                            window.location.href = "{:U('Login/login')}"
                        }
                    },1500)
                }
        },error: function (result) {
                $.toast("请求错误！", "cancel");
            }
        });
    }
</script>
</body>
</html>